package com.example.hospitalsystem.mapper;

import com.example.hospitalsystem.pojo.entity.Prescription;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

/**
 * <p>
 * 处方表 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2024-04-15
 */
@Mapper
public interface PrescriptionMapper extends BaseMapper<Prescription> {
    /**
     * 根据患者id删除对应处方表数据
     * @param patientId
     */
    @Delete("delete from prescription where patient_id = #{patientId}")
    void deletePrescriptionByPatientId(Integer patientId);
}
